package org.jeecg.common.event;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 领料单出库事件
 * 用于OMS模块通知WMS模块创建出库单
 */
@Data
@Accessors(chain = true)
public class RequisitionOutboundEvent implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**领料单ID*/
    private String requisitionId;
    
    /**领料单号*/
    private String requisitionNo;
    
    /**关联订单ID*/
    private String orderId;
    
    /**关联订单号*/
    private String orderNo;
    
    /**仓库ID*/
    private String warehouseId;
    
    /**租户ID*/
    private String tenantId;
    
    /**创建人*/
    private String createBy;
    
    /**型材清单*/
    private List<ProfileItem> profileList;
    
    /**配件清单*/
    private List<AccessoryItem> accessoryList;
    
    /**
     * 型材项目
     */
    @Data
    @Accessors(chain = true)
    public static class ProfileItem implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /**型材编码*/
        private String profileCode;
        
        /**型材名称*/
        private String profileName;
        
        /**颜色*/
        private String color;
        
        /**长度*/
        private BigDecimal length;
        
        /**宽度*/
        private BigDecimal width;
        
        /**高度*/
        private BigDecimal height;
        
        /**数量*/
        private Integer quantity;
        
        /**重量*/
        private BigDecimal weight;
    }
    
    /**
     * 配件项目
     */
    @Data
    @Accessors(chain = true)
    public static class AccessoryItem implements Serializable {
        private static final long serialVersionUID = 1L;
        
        /**配件编码*/
        private String accessoryCode;
        
        /**配件名称*/
        private String accessoryName;
        
        /**规格*/
        private String specification;
        
        /**数量*/
        private Integer quantity;
        
        /**长度数量*/
        private String lengthQuantity;
        
        /**单位*/
        private String unit;
        
        /**品牌*/
        private String brand;
    }
}
